package com.zj.HJ;

import java.util.Scanner;

public class HJ69 {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        while (sc.hasNext()) {
            int row1 = sc.nextInt();
            int col1 = sc.nextInt();
            int row2 = col1;
            int col2 = sc.nextInt();
            int[][] first = new int[row1][col1];
            int[][] second = new int[row2][col2];
            int[][] res = new int[row1][col2];
            for (int i = 0; i < row1; i++) {
                for (int j = 0; j < col1; j++) {
                    first[i][j] = sc.nextInt();

                }
            }
            for (int i = 0; i < row2; i++) {
                for (int j = 0; j < col2; j++) {
                    second[i][j] = sc.nextInt();
                }
            }
            getRes(first, second, res);
        }
    }

    public static void getRes(int[][] arr1, int[][] arr2, int[][] res) {
        for (int i = 0; i < res.length; i++) {
            for (int j = 0; j < res[i].length; j++) {
                for (int k = 0; k < arr2.length; k++) {
                    res[i][j] += arr1[i][k] * arr2[k][j];
                }
                System.out.print(res[i][j]);
                if (j == res[i].length - 1) {
                    System.out.println();
                } else {
                    System.out.print(" ");
                }
            }
        }
    }


}
